//基础属性
class BasicAttri {

    static getInstance() {
        if (!BasicAttri.instance) {
            BasicAttri.instance = new BasicAttri();
        }
        return BasicAttri.instance;
    }

    create(opts) {
        opts = opts || {};
        return {
            maxHp: opts.maxHp || 0, //最大生命
            attack: opts.attack || 0, //攻击力
            pdef: opts.pdef || 0, //物理防御力
            ldef: opts.ldef || 0, //法术防御力
            toughness: opts.toughness || 0, //韧性
            crit: opts.crit || 0, //暴击
            critHurt: opts.critHurt || 50, //暴击伤害
            dodge: opts.dodge || 0, //闪避
            hit: opts.hit || 0, //命中
        }
    }
}

export default BasicAttri.getInstance();